#pragma once

#include <QLabel>
#include <QMainWindow>
#include "Game.h"
#include "GameBoard.h"

namespace Ui {
    class MainWindow;
}

// 主窗口
class MainWindow: public QMainWindow {
    Q_OBJECT

    private: Ui::MainWindow* ui;        // 界面
    private: GameBoard mGameBoard;      // 游戏区域
    private: Game mGame;                // 游戏
    private: QLabel mLabelDifficulty;   // "难度"标签
    private: QLabel mLabelScore;        // "得分"标签

    public: explicit MainWindow(QWidget* parent = nullptr);
    public: ~MainWindow();
    private: bool eventFilter(QObject*, QEvent*);
    private: void keyPressEvent(QKeyEvent*);
    private slots: void on_buttonHelp_triggered();
    private slots: void on_buttonMusic_triggered();
    private slots: void on_buttonPause_triggered();
    private slots: void on_buttonStart_triggered();
    private slots: void onDifficultyUp(int);
    private slots: void onGameOver(bool);
    private slots: void onScore(int);
};
